(calculate_scrolling): Defend against negative baud_rate.
authorRichard M. Stallman <rms@gnu.org>
Mon, 31 May 1993 19:04:07 +0000 (19:04 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 31 May 1993 19:04:07 +0000 (19:04 +0000)
src/scroll.c

index c4882cd091f83a49ab30bd973477e11c02f0bb18..3f2724380b3fc2811a5efe850543f909adc1cd00 100644 (file)
@@ -108,6 +108,9 @@ calculate_scrolling (frame, matrix, window_size, lines_below,
      at least 1/4 second.  */
   int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame));
 
+  if (baud_rate <= 0)
+    extra_cost = 1;
+
   /* initialize the top left corner of the matrix */
   matrix->writecost = 0;
   matrix->insertcost = INFINITY;